<template>
  <div id="notPermissionPage">
    <img :src="image404" alt="" />
    <div>
      <span
        >云选购物系统提醒：<br />&emsp;&emsp;您访问页面不存在，请访问已存在的页面！</span
      >
      <el-button @click="toPush"> 返回首页</el-button>
    </div>
  </div>
</template>
<script lang="ts" setup>
import image404 from "@/assets/404.png";
import { getHomePathByRole } from "@/util/RouterUtil";
import { useRouter } from "vue-router";

const router = useRouter();

function toPush() {
  router.push(getHomePathByRole());
}
</script>

<style scoped>
#notPermissionPage {
  display: flex;
  flex-direction: row;
  justify-content: center;

  img {
    flex: 1;
    width: 40%;
    height: 40%;
  }

  div {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px;
    text-align: center;

    span {
      font-size: 36px;
      font-weight: bold;
      padding: 20px;
      text-align: left;

      &:last-child {
        text-indent: 2em;
      }
    }

    button {
      width: 30%;
    }
  }
}
</style>
